#include "editteach.h"
#include "ui_editteach.h"
#include "mainWidget.h"

EditTeach::EditTeach(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::EditTeach)
{
    ui->setupUi(this);

    pWidget = static_cast<Widget*>(parent);

    //返回设置子界面
    connect(ui->Btn_Ok, &QPushButton::clicked, this, [=](){
        pWidget->editTeachEnd();
    });
    connect(ui->Btn_Cancel, &QPushButton::clicked, this, [=](){
        pWidget->editTeachEnd();
    });

    connect(ui->Btn_axisMovePonitSel, &QPushButton::clicked, this, [=](){
        pWidget->FreeProgPage();
    });
}

EditTeach::~EditTeach()
{
    delete ui;
}

void EditTeach::switchDialog(const int dialogID)
{
    ui->stackedWidget_dialog->setCurrentIndex(dialogID);
}
